using Engine.OldSerialization;

namespace RuthlessConquest {
    public class EnumsSerializer : ISerializer<Faction>, ISerializer<Platform>, ISerializer<PlayerType> {
        public void Serialize(InputArchive archive, ref Faction value) {
            int value2 = 0;
            archive.Serialize(null, ref value2);
            value = (Faction)value2;
        }

        public void Serialize(OutputArchive archive, Faction value) {
            archive.Serialize(null, (int)value);
        }

        public void Serialize(InputArchive archive, ref Platform value) {
            int value2 = 0;
            archive.Serialize(null, ref value2);
            value = (Platform)value2;
        }

        public void Serialize(OutputArchive archive, Platform value) {
            archive.Serialize(null, (int)value);
        }

        public void Serialize(InputArchive archive, ref PlayerType value) {
            int value2 = 0;
            archive.Serialize(null, ref value2);
            value = (PlayerType)value2;
        }

        public void Serialize(OutputArchive archive, PlayerType value) {
            archive.Serialize(null, (int)value);
        }
    }
}